Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixing flaky test #1671

Merged
merged 2 commits into from
Apr 8, 2022
Merged

Fixing flaky test #1671

merged 2 commits into from
Apr 8, 2022

Conversation

crawlingcub
Copy link
Contributor

The test test_labeling_convergence in test/labeling/test_convergence.py sometimes fails when the seed settings are removed. It failed 52 out of 500 runs times for me on my machine. Updating the assertion threshold to 0.06 ensures that the test always passes (even without seeds). For obtaining this solution, I analyzed the underlying tail distribution of the err variable and computed the 99.99th percentile. This provided an estimate of ~0.0555. I rounded up the value in the assertion to fix the test.

I think the seed settings on lines 61-63 can also be removed since this class only has one test. I can remove them if you agree with this change.

Please let me know if this change looks reasonable. I will be happy to incorporate any other suggestions that you may have.

Thanks!

@github-actions
Copy link

This pull request is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions
Copy link

github-actions bot commented Apr 4, 2022

This pull request is stale because it has been open 90 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@fpoms
Copy link
Contributor

fpoms commented Apr 7, 2022

@crawlingcub thanks for the contribution--and sorry for the delay here. I've confirmed this works as you described am ok to merge if that's ok with you!

@fpoms
Copy link
Contributor

fpoms commented Apr 7, 2022

@crawlingcub if you could rebase onto main, and the tests pass, then I can merge this.

@crawlingcub
Copy link
Contributor Author

hi i merged master. can you merge?

@fpoms fpoms merged commit 400359c into snorkel-team:master Apr 8, 2022
@fpoms
Copy link
Contributor

fpoms commented Apr 8, 2022

Merged! Thanks @crawlingcub !

akode pushed a commit to akode/snorkel that referenced this pull request Jun 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants